package com.zenithmind.chat.pojo.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.zenithmind.common.base.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.AllArgsConstructor;
import lombok.NoArgsConstructor;

@EqualsAndHashCode(callSuper = true)
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("ai_chat_message")
@Schema(description = "AI对话消息实体")
public class AiChatMessage extends BaseEntity {
    
    @Schema(description = "对话ID")
    private String chatId;
    
    @Schema(description = "角色(user/assistant/system)")
    private String role;
    
    @Schema(description = "消息内容")
    private String content;
    
    @Schema(description = "token数量")
    private Integer tokenCount;
    
    @Schema(description = "父消息ID")
    private String parentId;
    
    @Schema(description = "状态(0-禁用,1-启用)")
    private Integer status;

    // === 临时方法 - 解决编译问题，等common模块可用后可移除 ===

    /**
     * 临时方法：获取ID
     * 当common模块可用时，此方法将由BaseEntity提供
     */
    public String getId() {
        return null;
    }

    /**
     * 临时方法：设置ID
     * 当common模块可用时，此方法将由BaseEntity提供
     */
    public void setId(String id) {
        // 实现由BaseEntity提供
    }
}